<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p>{{name}}</p>
    </div>
    <script src="../dist/vue.js"></script>
    <script>
        // $nextTick APi 测试
        var vm = new Vue({
            data: {
                name: 'ZhangSan'
            }
        })
        vm.$mount('#app')
        vm.name = 'LiSi'
        console.log(app.innerHTML); // 打印 <p>ZhangSan</p>

        vm.$nextTick(() => {
            console.log('nextTick 中获取 ' + app.innerHTML);
        })
    </script>
</body>

</html>